package com.whd.DIP;

/**
 * @author whd
 * @date 2024/07/19 15:26:02
 */
public class People {
    private Animal animal;

    private String name;

    public void show(){
        System.out.println(name+"观看"+animal.getName());
        animal.fie();
        animal.swing();
    }
    public void feet(String foot){
        System.out.println(name+"投喂"+animal.getName());
        animal.eat(foot);
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Animal getAnimal() {
        return animal;
    }

    public void setAnimal(Animal animal) {
        this.animal = animal;
    }
}
